package elementui.form;

/**
 * javazgw@gmail.com windown 10
 * 2020/6/28 22:59
 */
public class Select extends FormItem {
    @Override
    String getDefaultHmtl() {
        return "<template>\n" +
                "  <el-select v-model=\""+getVmode()+"\" placeholder=\"请选择\">\n" +
                "    <el-option\n" +
                "      v-for=\"item in form.options\"\n" +
                "      :key=\"item.value\"\n" +
                "      :label=\"item.label\"\n" +
                "      :value=\"item.value\">\n" +
                "    </el-option>\n" +
                "  </el-select>\n" +
                "</template>";
    }
    @Override
    String getDefaultScript() {
        return null;
    }

   /* @Override
    String getData() {
        return "options: [{\n" +
                "          value: '选项1',\n" +
                "          label: '黄金糕'\n" +
                "        }, {\n" +
                "          value: '选项2',\n" +
                "          label: '双皮奶'\n" +
                "        }, {\n" +
                "          value: '选项3',\n" +
                "          label: '蚵仔煎'\n" +
                "        }, {\n" +
                "          value: '选项4',\n" +
                "          label: '龙须面'\n" +
                "        }, {\n" +
                "          value: '选项5',\n" +
                "          label: '北京烤鸭'\n" +
                "        }],\n" +
                data + "    : ''";
    }*/

    String getDefaultDate() {
        return " options: [{\n" +
                "          value: '选项1',\n" +
                "          label: '黄金糕'\n" +
                "        }, {\n" +
                "          value: '选项2',\n" +
                "          label: '双皮奶'\n" +
                "        }, {\n" +
                "          value: '选项3',\n" +
                "          label: '蚵仔煎'\n" +
                "        }, {\n" +
                "          value: '选项4',\n" +
                "          label: '龙须面'\n" +
                "        }, {\n" +
                "          value: '选项5',\n" +
                "          label: '北京烤鸭'\n" +
                "        }],\n" +
                "        value: ''";
    }
}
